<?php
class Form {
    /**
     * 
     * constructor of Form Class
     * 
     * @return construct Nothing
     */
    function __construct() {
        return $construct;
    }
    /**
     * textField
     * 
     * @param string  $name  sets the name of textfield
     * 
     * @param string  $class  sets the class of textfield
     * 
     * @param string  $id  sets the id of textfield
     * 
     * @param string  $label  sets the label of textfield
     * 
     * @param string  $value  sets the value of textfield     
     * 
     * 
     */
    public function textField( $name, $class, $id, $label = NULL, $value = NULL ) {
        $textfield.='<input type="text" name="'.$name.'" class="'.$class.'" id="'.$id.'" placeholder="'.$label.'" value="'.$value.'"  />';
        return $textfield;
    }
    public function textFieldDate( $name, $class, $id, $label = NULL, $value = NULL ) {
        $textfield.='<div class="'.$class.'" id="'.$id.'">';
        $textfield.='<input type="text" name="'.$name.'" placeholder="'.$label.'" value="'.$value.'"></input>';
        $textfield.='<span class="add-on">';
        $textfield.='<i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>';
        $textfield.='</span>';
        $textfield.='</div>';
        return $textfield;
    }
    /**
     * passwordField
     *
     * @param string  $name  sets the name of textfield
     * 
     * @param string  $class  sets the class of textfield
     * 
     * @param string  $id  sets the id of textfield
     * 
     * @param string  $label  sets the label of textfield
     * 
     * @param string  $value  sets the value of textfield     
     * 
     * @return string Just use passwordField function to create a password field with your PHP
     */
    public function passwordField( $name, $class, $id, $label = NULL, $value = NULL ) {
        $passwordField.='<input type="password" name="'.$name.'" class="'.$class.'" id="'.$id.'" placeholder="'.$label.'" value="'.$value.'"  />';
        return $passwordField;
    }
    /**
     * hiddenField
     *
     * @param string  $name  sets the name of hidden field
     * 
     * @param string  $class  sets the class of hidden field
     * 
     * @param string  $id  sets the id of hidden field
     * 
     * @param string  $label  sets the label of hidden field
     * 
     * @param string  $value  sets the value of hidden field     
     * 
     * @return string Just use hiddenField function to create a hidden field with your form
     */
    public function hiddenField( $name, $class, $id, $label = NULL, $value = NULL ) {
        $passwordField.='<input type="hidden" name="'.$name.'" class="'.$class.'" id="'.$id.'" placeholder="'.$label.'" value="'.$value.'"  />';
        return $passwordField;
    }
    /**
     * textArea
     *
     * @param string  $name  sets the name of textarea
     * 
     * @param string  $class  sets the class of textarea
     * 
     * @param string  $id  sets the id of textarea
     * 
     * @param string  $value  sets the value of textarea     
     * 
     * @return string Just use textArea function to create a textarea with your Form
     */
    
    public function textArea( $name, $class, $id, $value = NULL ) {
        $textArea.='<textarea name="'.$name.'" class="'.$class.'" style="width: 206px; height: 21px;" id="'.$id.'">'.$value.'</textarea>';
        return $textArea;
    }
    /**
     * textFieldReadyOnly
     *
     * @param string  $name  sets the name of textfield
     * 
     * @param string  $class  sets the class of textfield
     * 
     * @param string  $id  sets the id of textfield
     * 
     * @param string  $label  sets the label of textfield
     * 
     * @param string  $value  sets the value of textfield     
     * 
     * @return string Just use textFieldReadyOnly function to create a Ready Only field with your Form
     */
    public function textFieldReadyOnly( $name, $class, $id, $readonly, $label = NULL, $value = NULL ) {
        $textfield.='<input type="text" name="'.$name.'" class="'.$class.'" id="'.$id.'" placeholder="'.$label.'" value="'.$value.'"  readonly="'.$readonly.'" />';
        return $textfield;
    }
}
?>